unit WARBroker;

interface

uses Classes, DBXJSON, DBXJSONReflect, WARCommons, VCL.Dialogs, DSService,
  sysutils, data.db, data.dbxoracle, data.SqlExpr, datasnap.provider,
  datasnap.dbclient, superobject;

type
{$METHODINFO ON}
  TBroker = class(TComponent)


  end;

{$METHODINFO OFF}



procedure connectDB();


implementation


procedure connectDB();
var
  conn: TSQLConnection;
  query: TSQLQuery;
begin
  conn := TSQLConnection.Create(nil);
  query := TSQLQuery.Create(nil);
  try
    try
      conn.ConnectionName := 'WAR_APP';
      conn.LoadParamsOnConnect := true;
      conn.LoginPrompt := false;
      conn.Connected := true;
      query.SQLConnection := conn;
      query.SQL.Text := 'select * from war_app_urlqueue where rownum = 1;';
      query.Open;
      while not query.Eof do
      begin
        logMessage(query.Fields[0].AsString);
        query.Next;
      end;
    except
      on E: Exception do
        logMessage(E.ClassName + ': ' + E.Message);
    end;
  finally
    query.Free;
    conn.Free;
  end;

end;




end.
